<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table  id="dg" class="easyui-datagrid" title="维度转换表" style="width:1200px;heigh:1024px"
           data-options="
            rownumbers:true
           ,checkOnSelect:true
           ,selectOnCheck:false
           ,singleSelect:true
           ,fitColumns:true
           ,url:'/dimTrans/getAllListInPage'
           ,method:'get'
           ,toolbar:'#tb'
           ,onClickRow: onClickRow
           ,pagination: true     //开启分页
           
        ">
        <thead data-options="frozen:true">
        <tr >
            <th data-options="field:'ck',checkbox:true"></th>
            <th data-options="field:'old_table_nm',align:'left',editor:'text'">原表名</th>
            <th data-options="field:'old_column_nm1',align:'left',editor:'text'">原字段名1</th>
            <th data-options="field:'old_key_id1',align:'left',editor:'text'">原枚举值1</th>
            <th data-options="field:'old_key_nm1',align:'left',editor:'text'">原枚举名1</th>
            <th data-options="field:'new_table_nm',editor:'text'">新表名</th>
            <th data-options="field:'new_column_nm',align:'left',editor:'text'">新字段名</th>
            <th data-options="field:'new_key_id',align:'left',editor:'text'">新枚举值</th>
            <th data-options="field:'new_key_nm',align:'left',editor:'text'">新枚举名</th>
            <th data-options="field:'biz_id',align:'center',formatter:geValue,with:100
            ,editor:{
							type:'combobox',
							options:{
								valueField:'id',
								textField:'value',
								method:'get',
								url:'/biz/getAllBizListNm',
								required:true
							}
						}

            ">业务</th>
        </tr>
        </thead>
    </table>


<script>
    $('#dg').datagrid({
        title: '维度转换表',       //表格标题
        width: 1200,            //表格宽度
        rownumbers: true
        , checkOnSelect: true
        , selectOnCheck: false
        , singleSelect: true
        , fitColumns: true
        // , url: '/dimTrans/getAllListInPage'
        , method: 'get'
        , toolbar: '#tb'
        , onClickRow: onClickRow(index)
        , pagination: true     //开启分页
        , pageSize: 20        //分页大小
        , pageNumber: 1,         //第几页显示（默认第一页，可以省略）
        //url: '/FreshStudentMaintain/test',  //获取数据地址
        columns: [[                //添加列
            {
                field: 'ck'
                , checkbox: true
                , title: '',        //显示列名称
            },
            {
                field: 'old_table_nm'
                , align: 'left'
                , editor: 'text'
                , title: '原表名',
            },
            {
                field: 'old_column_nm1'
                , align: 'left'
                , editor: 'text'
                , title: '原字段名1',
            },
            {
                field: 'old_key_id1'
                , align: 'left'
                , editor: 'text'
                , title: '原枚举值1',
            },
            {
                field: 'old_key_nm1'
                , align: 'left'
                , editor: 'text'
                , title: '原枚举名1',
            },
            {
                field: 'new_table_nm'
                , align: 'left'
                , editor: 'text'
                , title: '新表名',
            },
            {
                field: 'new_column_nm'
                , align: 'left'
                , editor: 'text'
                , title: '新字段名',
            },
            {
                field: 'new_key_id'
                , align: 'left'
                , editor: 'text'
                , title: '新枚举值',
            },
            {
                field: 'new_key_nm'
                , align: 'left'
                , editor: 'text'
                , title: '新枚举名',
            },
            {
                field: 'biz_id'
                , align: 'center'
                , editor: 'text'
                , title: '业务'
                , editor: {
                type: 'combobox',
                options: {
                    valueField: 'id',
                    textField: 'value',
                    method: 'get',
                    url: '/biz/getAllBizListNm',
                    required: true
                }
            }
                ,formatter:getValue(value, row, index)
            }

        ]],
    });
</script>
</body>
</html>